package com.yan;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author yanheng
 * @data 2020/1/2 18:43
 */
public class SimpleHttpServer {
    private String host;
    private int port;

    private Map<String, List<Viewer>> viewers = new HashMap<>();

    public SimpleHttpServer(String host, int port) {
        this.host = host;
        this.port = port;
    }

    public void addViewers(String urlDirectroy, Viewer viewer){
        if (!viewers.containsKey(urlDirectroy)){
            viewers.put(urlDirectroy, new ArrayList<>());
        }
        viewers.get(urlDirectroy).add(viewer);

    }

    public void run() {}
}
